package cn.udinghuo.model.voucher.freight;

import com.fasterxml.jackson.annotation.JsonSetter;

import org.springframework.util.Assert;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.Column;
import cn.udinghuo.core.domain.entity.BaseAuditTenant;	
import cn.udinghuo.model.voucher.freight.ConditionsFreePostage;	
import cn.udinghuo.model.voucher.freight.FreightWay;	
import java.util.List;	
import cn.udinghuo.core.domain.entity.Comment;
import cn.udinghuo.core.domain.entity.ita.CacheKey;

/**
 * @author xufla
 *	运费模板基础信息
 */
@Entity
@Table(name="freightrule")
public class FreightRule extends BaseAuditTenant<Long>  {

	private static final long serialVersionUID = -369098753L;
	/**
	* 模板标题title
	*/
	@Comment(value="模板标题")
	@Column(name="cTitle", length = 255)
	private String title;
	/**
	* 是否默认运费模板defaultRule
	*/
	@Comment(value="是否默认运费模板")
	@Column(name="bDefaultRule")
	private Boolean defaultRule;
	/**
	* 是否条件包邮activateConditionsFreePostage
	*/
	@Comment(value="是否条件包邮")
	@Column(name="bActivateConditionsFreePostage")
	private Boolean activateConditionsFreePostage;
	@Transient
	private ConditionsFreePostage conditionsFreePostage;
	@Transient
	private List<FreightWay> freightWays;
	public String getTitle() {
		return this.title;
	}
	
	public void setTitle(String value) {
		this.title = value;
	}
	
	public Boolean getDefaultRule() {
		if(this.defaultRule == null){
			return false;
        }
		return this.defaultRule;
	}
	
	public void setDefaultRule(Boolean value) {
		this.defaultRule = value;
	}
	
	public Boolean getActivateConditionsFreePostage() {
		return this.activateConditionsFreePostage;
	}
	
	public void setActivateConditionsFreePostage(Boolean value) {
		this.activateConditionsFreePostage = value;
	}
	
	public ConditionsFreePostage getConditionsFreePostage() {
		return this.conditionsFreePostage;
	}
	
	public void setConditionsFreePostage(ConditionsFreePostage conditionsFreePostage) {
		this.conditionsFreePostage = conditionsFreePostage;
	}
	
	public List<FreightWay> getFreightWays() {
		return this.freightWays;
	}
	public void setFreightWays(List<FreightWay> value) {
		this.freightWays = value;
	}
	
}
